/**
 * 返回参数父类
 */
export class ParentRes {
  /**
   * 主键id
   */
  private id;

  /**
   * 创建人
   */
  private createdBy;

  /**
   * 创建时间
   */
  private createTime;
  /**
   * 更新人
   */
  private updatedBy;

  /**
   * 更新时间
   */
  private updateTime;

  /**
   * 版本,用于乐观锁,默认值0
   */
  private version;

  constructor(data: any = {}) {
    this.id = data.id;
    this.createdBy = data.createdBy;
    this.createTime = data.createTime;
    this.updatedBy = data.updatedBy;
    this.updateTime = data.updateTime;
    this.version = data.version;

  }
}

/**
 * 请求参数父类
 */
export class ParentReq {

}


/**
 * 系统
 */
export class SystemRes extends ParentRes {
  public systemName: any;
  public systemType: any;
  public systemInfoList: Array<SystemInfo>;
  public authorityList: Array<Authority>;

  constructor(data: any = {}) {
    super(data);
    this.systemName = data.systemName;
    this.systemType = data.systemType;
    this.systemInfoList = data.systemInfoList;
    this.authorityList = data.authorityList;
  }

}

/**
 * 系统信息
 */
export class SystemInfo extends ParentRes {
  public name: any;
  public code: any;
  public value: any;
  public systemId: any;

  constructor(data: any = {}) {
    super(data);
    this.name = data.name;
    this.code = data.code;
    this.value = data.value;
    this.systemId = data.systemId;
  }
}

/**
 * 权限
 */
export class Authority extends ParentRes {
  public name: any;
  public authorityType: any;
  public menuId: any;
  public urlId: any;
  public menu: Menu;
  public url: Url;
  public funcList: any;

  constructor(data: any = {}) {
    super(data);
    this.name = data.name;
    this.authorityType = data.authorityType;
    this.menuId = data.menuId;
    this.urlId = data.urlId;
    this.menu = data.menu;
    this.url = data.url;
    this.funcList = data.funcList;
  }

}

/**
 * 后端地址
 */
export class Url extends ParentRes {
  public url: any;
  public code: any;
  public name: any;
  public method: any;
  public service: any;

  constructor(data: any = {}) {
    super(data);
    this.url = data.url;
    this.code = data.code;
    this.name = data.name;
    this.method = data.method;
    this.service = data.service;
  }
}

/**
 * 菜单
 */
export class Menu extends ParentRes {
  public url: any;
  public code: any;
  public name: any;
  public path: any;
  public redirect: any;
  public iconClass: any;
  public hidden: any;
  public myId: any;
  public seq: any;
  public isLeaf: any;
  public isRoot: any;

  constructor(data: any = {}) {
    super(data);
    this.url = data.url;
    this.code = data.code;
    this.name = data.name;
    this.path = data.path;
    this.redirect = data.redirect;
    this.iconClass = data.iconClass;
    this.hidden = data.hidden;
    this.myId = data.myId;
    this.seq = data.seq;
    this.isLeaf = data.isLeaf;
    this.isRoot = data.isRoot;
  }
}

/**
 * 验证码信息
 */
export class VerifyCodeInfo {
  public code: any;
  public imgBytes: any;
  public imgUrl: any;

  constructor(data: any = {}) {
    this.code = data.code;
    this.imgBytes = data.imgBytes;
    this.imgUrl = data.imgUrl;
  }
}


/**
 * 登录
 */
export class Login {
  public account: any;
  public password: any;
  public verifyCode: any;
  public code: any;
  public systemType: any;

  constructor(data: any = {}) {
    this.account = data.account;
    this.password = data.password;
    this.verifyCode = data.verifyCode;
    this.code = data.code;
    this.systemType = data.systemType;
  }
}


export class Token {
  public token;
  public expiryTime;
  public createTime;

  constructor(data: any = {}) {
    this.token = data.token;
    this.expiryTime = data.expiryTime;
    this.createTime = data.createTime;
  }
}
